<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ include file="/page/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%-- <%@ include file="/adapter/adapter-easyui.jsp" %> --%>
<%@ include file="/adapter/adapter-bootstrap.jsp"%>
<link
	href="${pageContext.request.contextPath}/frontframe/easyui/themes/easyui-extend.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function save() {
		var str_data = $("#appAdRoll input").map(function() {
			return ($(this).attr("name") + '=' + $(this).val());
		}).get().join("&");
		$.ajax({
			url : "${ctx}/appAdRoll/updateAdRoll",
			type : "POST",
			dataType : "json",
			data : str_data,
			async : false,
			success : function(data) {
				if (data.flag > 0) {
					alert("保存成功！");
					//window.location.reload();
				}
				/* 	          $.each(data, function(index, element) {
				 window.location.reload();
				 }); */
			},
			error : function() {
				alert("error");
			}
		});
	}

	function goBack() {
		//window.location.href='${ctx}/auth/appDeviceList?appid=${appid}';
		window.history.back(-1);
		//window.history.go(-2);
	}
</script>
</head>
<body onload="showSelect()">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">广告轮播信息</h3>
		</div>
		<div class="panel-body">
			<!-- <div id="p" class="easyui-panel" title="交易信息" style="width:100%;height:100%;padding:10px;" > -->
			<form class="form-horizontal" role="form" id="appAdRoll">
				<div class="form-group">
					<label class="col-xs-2 control-label" for="recordKey">广告编号</label>
					<div class="col-xs-4">
						<input class="form-control" id="recordKey" name="recordKey"
							type="text" readonly="readonly" value="${appAdRoll.recordKey}" placeholder="" />
					</div>
					<label class="col-xs-2 control-label" for="appId">移动应用标识</label>
					<div class="col-xs-4">
						<input class="form-control" id="appId" name="appId" type="text"
							readonly="readonly" value="${appAdRoll.appId}" placeholder="" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-2 control-label" for="adFileUrl">广告图片地址</label>
					<div class="col-xs-4">
						<input class="form-control" id="adFileUrl" name="adFileUrl"
							type="text" value="${appAdRoll.adFileUrl}" placeholder="" />
					</div>
					<label class="col-xs-2 control-label" for="jumpUrl">跳转连接</label>
					<div class="col-xs-4">
						<input class="form-control" id="jumpUrl" name="jumpUrl"
							type="text" value="${appAdRoll.jumpUrl}" placeholder="" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-2 control-label" for="adRollLength">广告轮播数量</label>
					<div class="col-xs-4">
						<input class="form-control" id="adRollLength" name="adRollLength"
							type="text" value="${appAdRoll.adRollLength}" placeholder="" />
					</div>
					<label class="col-xs-2 control-label" for="adRollInt">轮播间隔时长</label>
					<div class="col-xs-4">
						<input class="form-control" id="adRollInt" name="adRollInt"
							type="text" value="${appAdRoll.adRollInt}" placeholder="" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-2 control-label" for="adDesc">广告说明</label>
					<div class="col-xs-10">
						<input class="form-control" id="adDesc" name="adDesc" type="text"
							value="${appAdRoll.adDesc}" placeholder="" />
					</div>
				</div>
				<div class="form-group  text-center">
					<button type="button" class="btn btn-default" onclick="save();">保存</button>
					<button type="button" class="btn btn-default" onclick="goBack()">返回</button>
				</div>
			</form>
		</div>
	</div>

</body>
</html>
